<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>rem和em的区别</title>
</head>
<body>
  <div class="d1">First</div>  
  <div class="d2">Second</div>
  <div class="d3">Third</div>
  <div class="d4">Forth</div>
</body>
<style>
  html {
    color: brown;
    font-size: 2rem;
    /* 将 html 下的所有 rem 标准从 16px 扩大为 2倍，32px */
  }
  .d1 {
    font-size: 1rem;
  }
  .d2 {
    font-size: 32px;
  }
  .d3 {
    font-size: 2rem;
  }
  .d4 {
    font-size: 64px;
  }
</style>
</html>